import React from 'react';
import ReactDOM from 'react-dom/client';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import App from './App';
import './index.css';
import 'moment/locale/zh-cn';

// 自定义主题配置
const theme = {
  token: {
    colorPrimary: '#00da3c',
    colorSuccess: '#00da3c',
    colorError: '#ec0000',
    colorWarning: '#faad14',
    colorInfo: '#1890ff',
    colorBgBase: '#1a1a1a',
    colorBgContainer: '#1a1a1a',
    colorBorder: '#333',
    colorText: '#ffffff',
    colorTextSecondary: '#999',
    colorTextTertiary: '#666',
    borderRadius: 4,
  },
  components: {
    Layout: {
      bodyBg: '#0a0e1b',
      headerBg: '#1a1a1a',
      siderBg: '#1a1a1a',
    },
    Card: {
      colorBgContainer: '#1a1a1a',
      colorBorder: '#333',
    },
    Input: {
      colorBgContainer: '#2a2a2a',
      colorBorder: '#555',
      colorText: '#ffffff',
    },
    Select: {
      colorBgContainer: '#2a2a2a',
      colorBorder: '#555',
      optionSelectedBg: '#2a2a2a',
    },
    Button: {
      primaryColor: '#ffffff',
    }
  }
};

const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);

root.render(
  <React.StrictMode>
    <ConfigProvider 
      locale={zhCN}
      theme={theme}
    >
      <App />
    </ConfigProvider>
  </React.StrictMode>
);
